package repository;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;

public class reportRepository {
	/**
	 * Save the last report to the external file.
	 *
	 */
	public void saveTheLastReport(ArrayList<String> str) {
        try {
			FileWriter out = new FileWriter(new File("report.txt").getAbsoluteFile());
			for(String s : str)
			{
				out.write(s);
				out.write(System.getProperty("line.separator"));
			}
        	out.close();
        	} catch(IOException e) {
        		throw new RuntimeException(e);
        }
	}
}
